package com.kmzx.one.project.mapper;

import com.kmzx.one.project.entity.UserAddress;
import com.kmzx.one.project.entity.XZQHTable;
import com.kmzx.one.project.others.dto.UserAddressInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserAddressMapper {

    List<UserAddressInfo> findAllAddress(@Param("userId") String userId);

    int resetUserDefaultAddress(@Param("userId") String userId);

    int insertAddress(UserAddress userAddress);

    UserAddress selectById(@Param("id") String id);

    int updateByIdSelective(UserAddress userAddress);

    int resetUserPriorityAddress(@Param("userId") String userId);

    int updateUserPriorityAddress(@Param("id") String id);

    XZQHTable findXZQHInfo(String id);
}
